<template>
   <el-form
    style="max-width: 60vw"
    label-width="150px"
    class="stepForm"
    size="mini"
    disabled
  >
    <el-card>
      <h3 style="line-height:50px">打款信息</h3>
      <el-form-item label="打款人姓名：">
        <span>{{ detailObj.payerName }}</span>
      </el-form-item>
      <el-form-item label="打款时间：">
        <span>{{ new Date(detailObj.payTime).Format('YYYY-MM-DD hh:mm:ss') }}</span>
      </el-form-item>
      <el-form-item label="打款金额：">
        <span>{{ detailObj.paymentMoney }}</span>
      </el-form-item>
    </el-card>
    <el-card class="mt20">
      <h3 style="line-height:50px">打款凭证</h3>
      <div class="flex">
        <el-image
            v-for="item in detailObj.payPicList"
            :key="item"
            :src="item"
            class="avatar"
            fit="contain"
            :preview-src-list="detailObj.payPicList"
            style="width: 200px; height: 250px;margin-right: 20px;"
          >
          </el-image>
      </div>
    </el-card>
  </el-form>
</template>

<script>
export default {
  
  data() {
    return {
      detailObj: {}
    }
  },
  watch: {
    id(){
      this.getRate();
    },
  },
  beforeMount() {
    this.getRate();
  },
  props: ["id"],
  methods: {
    getRate() {
      this.loading = true;
      this.$ajax
        .getData("adm/order/getDetail", {id: this.id})
        .then((data) => {
          this.loading = false;
          this.detailObj = data.resData
        })
        .catch((error) => {
          this.loading = false;
          this.$message({
            message: error.codeDes || error.message,
            type: "error",
          });
        });
    },
  },
}
</script>

<style scoped>
img {
  width: 100px;
  height: 100px;
}
</style>